package com.maxd.service.helpTask;

import com.maxd.model.HelpSendOrder;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.Map;


public interface HelpSendOrderService {

    Page<Map<String,Object>> selectSendOrderByTaskId(Pageable pageable, Long helpTaskId);

    Double sumMoneyBySend(String time,Integer flag);

    Integer countBySend(String time,Integer flag);

    Page<Map<String,Object>> selectSendOrderList(Pageable pageable, String phone, Integer state);

    HelpSendOrder selectByHelpTaskId( Long helpTaskId,Long userId);

    Integer selectCountByHelpTaskIdAndUserId( Long helpTaskId,Long userId);

    public Integer save(HelpSendOrder helpSendOrder);

    HelpSendOrder selectById(Long helpSendOrderId);

    Integer updateHelpSendOrder(HelpSendOrder helpSendOrder,HelpSendOrder oldHelpSendOrder);

    Integer update(Long id,Integer state);

    Integer selectResidueNum(Long helpTaskId,Integer state);

    Integer endHelpSendOrder(Long helpSendOrderId);

    Integer selectEndNum(Long helpTaskId);

}
